package com.timesheet.serverice;

import java.util.List;

import com.timesheet.server.common.models.ProjectDTO;
import com.timesheet.server.dao.ProjectDao;

public class ProjectService {
	ProjectDao projectDao = new ProjectDao();
	
	public boolean createProject(ProjectDTO projectDto){
		return projectDao.createProject(projectDto);
	}
	
	public List<ProjectDTO> getProjects(){
		return projectDao.getProjects();
	}
	
	public static void main(String[] args) {
		
		new ProjectService().createProject(getProject());
		System.out.println("Created the project");
		System.out.println(new ProjectService().getProjects());
		
	}
	
	public static ProjectDTO getProject(){
		ProjectDTO dto = new ProjectDTO();
		dto.setProjectId("ABSL");
		dto.setProjectName("ABSKRAFT");
		return dto ;
	}

}
